# Contributor: Wieland Hoffmann <the_mineo@web.de>
# Maintainer: Gaetan Bisson <bisson@archlinux.org>

pkgname=chromaprint
pkgver=1.4.3
pkgrel=2
pkgdesc='Library that implements a custom algorithm for extracting fingerprints from any audio source'
url='https://acoustid.org/chromaprint'
arch=('x86_64')
license=('LGPL')
depends=('ffmpeg')
makedepends=('cmake' 'git')
source=("https://github.com/acoustid/chromaprint/releases/download/v${pkgver}/chromaprint-${pkgver}.tar.gz")
sha256sums=('ea18608b76fb88e0203b7d3e1833fb125ce9bb61efe22c6e169a50c52c457f82')

#_commit=f2ce2e7ff05cf2b0b5e473fff55f31acf07c6a92 #tag=v1.4.2
#source=("git+https://github.com/acoustid/chromaprint.git#commit=$_commit")

build() {
	cd "${srcdir}/${pkgname}-v${pkgver}"
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=Release \
		-DBUILD_TOOLS=ON \
		.
	make
}

package() {
	cd "${srcdir}/${pkgname}-v${pkgver}"
	make DESTDIR="${pkgdir}" install
}
